package com.shuiyun.jtt.utils;

import com.shuiyun.jtt.handler.Handler;
import com.shuiyun.jtt.message.jt808.T0100;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author shuiyun
 * @program gateway
 * @description 缓存信息
 * @date 2022-04-19 15:48
 **/
public enum CacheKey {

    // 单例
    instance;

    /** 缓存所有的消息ID和实体的映射信息 */
    @Getter
    private final Map<Integer, Class<?>> messageMap = new HashMap<>();

    @Getter
    private final Map<Integer, Handler> handlerMap = new HashMap<>();

    /**
     * key mobileNO
     * value 已注册设备
     */
    @Getter
    private final ConcurrentHashMap<String, T0100> registerDeviceInfoMap = new ConcurrentHashMap<>();


}
